package org.elanfox.intellicommunity.data.base.base;

import org.elanfox.intellicommunity.data.base.dto.BaseSearchDTO;
import org.springframework.data.domain.Page;

import java.io.Serializable;

/**
 * @author allan
 * @date 09/11/2017
 */
public interface SearchableCrudService<T, ID extends Serializable> extends CrudService<T, ID> {
    /**
     * 根据条件分组查找
     *
     * @param pageIndex 页码，索引从1开始
     * @param pageSize  每页数量
     * @param searchDTO 查询条件
     * @return
     */
    Page<T> findAll(int pageIndex, int pageSize, BaseSearchDTO searchDTO);

    Page<T> findAll(int pageIndex, int pageSize);
}
